﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title>Unix时间戳转换 - huatools.com</title>
    <meta charset="UTF-8">
    <meta name="keywords" content="时间戳转换,Unix时间戳">
    <meta name="description" content="在线Unix时间戳转北京时间、北京时间转时间戳工具，精确到13位毫秒。">
    <meta name="renderer" content="webkit">
    <link rel="icon" href="../img/favicon.ico"/>
    <link rel="stylesheet" href="//lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/layui/2.5.5/css/layui.min.css"/>
    <link rel="stylesheet" href="../css/public.min.css"/>
    <link rel="stylesheet" href="index.min.css"/>
    <script src="//lf26-cdn-tos.bytecdntp.com/cdn/expire-1-y/layui/2.5.5/layui.js"></script>
    <script src="//lf9-cdn-tos.bytecdntp.com/cdn/expire-1-y/jquery/3.6.0/jquery.min.js"></script>
    <script src="//lf9-cdn-tos.bytecdntp.com/cdn/expire-1-y/cleave.js/1.6.0/cleave.min.js"></script>
    <script src="../js/public.min.js"></script>
    <script src="index.min.js"></script>
</head>
<body>
<div class="body-div">
    <div class="menu-div">
        <ul class="layui-nav">
            <li class="layui-nav-item"><a href="/public/">JSON格式化</a></li>
            <li class="layui-nav-item"><a href="/public/xml-format/">XML格式化</a></li>
            <li class="layui-nav-item">
                <a href="javascript:">URL工具</a>
                <dl class="layui-nav-child"></dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:">对比工具</a>
                <dl class="layui-nav-child"></dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:">转换工具</a>
                <dl class="layui-nav-child"></dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:">分隔工具</a>
                <dl class="layui-nav-child"></dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:">文本工具</a>
                <dl class="layui-nav-child"></dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:">数字工具</a>
                <dl class="layui-nav-child"></dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:">格式化</a>
                <dl class="layui-nav-child"></dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:">加解密</a>
                <dl class="layui-nav-child"></dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:">更多</a>
                <dl class="layui-nav-child"></dl>
            </li>
            <li class="layui-nav-item skin-nav-item">
                <a href="javascript:"><i class="layui-icon layui-icon-theme"></i>换肤</a>
                <dl class="layui-nav-child"></dl>
            </li>
        </ul>
    </div>
    <div class="main-div">
        <div class="layui-container">
            <div class="layui-row header-row">
                <span>北京时间</span>
                <input type="text" id="current-time" class="current">
                <span>时间戳</span>
                <input type="text" id="current-unix-time" class="current">
                <span>秒</span>
                <input type="text" id="current-unix-time13" class="current">
                <span>毫秒</span>
                <button id="stop" class="layui-btn layui-btn-danger">停止</button>
            </div>
            <hr class="layui-bg-dark">
        </div>
        <div class="layui-container main-container">
            <div class="layui-row">
                <div class="layui-col-left">
                    <input type="text" id="unix-time-10" class="layui-input" maxlength="10" placeholder="10位时间戳/秒" title="10位时间戳/秒" onkeyup="value=value.replace(/[^\d{1,}]/g,'')">
                </div>
                <div class="layui-col-center">
                    <button id="to-bj-time" class="layui-btn layui-btn-white">转北京时间</button>
                </div>
                <div class="layui-col-right">
                    <input type="text" id="out-unix-time" class="layui-input">
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-left">
                    <input type="text" id="unix-time-13" class="layui-input" maxlength="13" placeholder="13位时间戳/毫秒" title="13位时间戳/毫秒" onkeyup="value=value.replace(/[^\d{1,}]/g,'')">
                </div>
                <div class="layui-col-center">
                    <button id="to-bj-time13" class="layui-btn layui-btn-white">转北京时间</button>
                </div>
                <div class="layui-col-right">
                    <input type="text" id="out-unix-time13" class="layui-input">
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-left">
                    <input type="text" id="bj-time" class="layui-input" maxlength="19" title="北京时间" onkeyup="value=value.replace(/[^- :\d{1,}]/g,'')">
                </div>
                <div class="layui-col-center">
                    <div class="layui-form-item" onsubmit="return false">
                        <form class="layui-form" action="">
                            <select name="to-stamp" id="to-stamp" lay-filter="to-stamp">
                                <option value="0">转秒</option>
                                <option value="1">转毫秒</option>
                            </select>
                        </form>
                    </div>
                </div>
                <div class="layui-col-right">
                    <input type="text" id="out-bj-time" class="layui-input">
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
